package practicaspl.cinco;

import java.io.IOException;

import org.antlr.runtime.ANTLRFileStream;
import org.antlr.runtime.CharStream;
import org.antlr.runtime.CommonTokenStream;
import org.antlr.runtime.RecognitionException;

import antlr.Token;


/**
 * Hello world!
 *
 */
public class App 
{
    public static void main( String[] args ) throws IOException, RecognitionException
    {
        CharStream fis = new ANTLRFileStream("EntradaFlex.txt");
        Analex analex = new Analex(fis);
        CommonTokenStream tokens = new CommonTokenStream();
        Anasint sint = new Anasint(tokens);
        

        tokens.setTokenSource(analex);

        System.out.println(tokens.toString());
       // while(tokens.getNumberOfOnChannelTokens() != Token.EOF_TYPE) {
        	//System.out.println(tokens.toString());
        //	tokens = (CommonTokenStream) analex.nextToken();
        //}

        //Anasint anasint = new Anasint(tokens);
        sint.flex();
    }
}
